package Dao;


import Model.Emp1;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;

public interface empDao {

    @Insert("insert into emp1(empId,name,tel,dress,money,sta) values (#{empId},#{name},#{tel},#{dress},#{money},#{sta})")
    void addEmp(HashMap hashMap);

    @Select("select  * from emp1")
    List<Emp1> showEmpDao();

    @Delete("delete from emp1 where empId=#{empId}")
    void deleteDao(int empId);


    @Update("update emp1 set name =#{name},tel=#{tel},dress=#{dress},money=#{money},sta=#{sta} where empId=#{empId}")
    void updateEmpDao(Emp1 obj);

    @Select("select * from emp1 where empId=#{empId}")
    Emp1 findOne(int empId);


}
